package com.liuzh.kaoyanspringboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-10
 */
@Getter
@Setter
  public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

      /**
     * id
     */
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      /**
     * 标题
     */
      private String name;

      /**
     * 内容
     */
      private String content;

      /**
     * 发布人
     */
      private Integer userId;

      private Integer like;
      private Integer collect;

      /**
     * 发布时间
     */
      private Date createTime;

      /**
     * 封面
     */
      private String coverUrl;

      @TableField(exist = false)
      private String user;

  @Override
  public String toString() {
    return "Article{" +
            "id=" + id +
            ", name='" + name + '\'' +
            ", content='" + content + '\'' +
            ", userId=" + userId +
            ", like=" + like +
            ", createTime=" + createTime +
            ", coverUrl='" + coverUrl + '\'' +
            ", user='" + user + '\'' +
            '}';
  }
}
